package com.one.common.receiver;

import com.one.common.R;
import com.one.common.config.RouterPath;
import com.one.common.manager.RouterManager;
import com.one.common.model.extra.DefaultExtra;
import com.one.common.view.base.BaseActivity;

/**
 * Author: zhulunjun
 * Email: zhulunjun@qq.com
 * CreateDate: 2018/11/13 15:19
 * Description：
 **/
public class JpushActivity extends BaseActivity {
    @Override
    protected void initPresenter() {

    }

    @Override
    protected void initTitle() {
        super.initTitle();
        noHasTitle();
    }

    @Override
    public int getLayoutResId() {
        return R.layout.activity_jpush;
    }

    @Override
    public void initData() {
        super.initData();
        JpushBean bean = (JpushBean) getIntent().getSerializableExtra(JpushBean.getExtraName());
        if(bean != null) {
            RouterManager.getInstance().go(RouterPath.ORDER_DETAIL, new DefaultExtra(bean.getOrder_id()));
        } else {
            RouterManager.getInstance().go(RouterPath.MAIN_PAGE);
        }
        finishPage();
    }
}
